import Main from "@/views/Main.vue";

const config = require('@/config/index')
// 不作为Main组件的子页面展示的页面单独写，如下
export const loginRouter = {
  path: "/login",
  name: "login",
  meta: {
    title: `登录 - ${config.title}运营后台`
  },
  component: () => import("@/views/login.vue")
};

// 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里
export const otherRouter = {
  path: "/",
  name: "otherRouter",
  redirect: "/home",
  component: Main,
  children: [
    {
      path: "home",
      title: '首页',
      name: "home_index",
      component: () => import("@/views/home/home.vue")
    },
    {
      path: "personal-center",
      title: "个人中心",
      name: "personal-center",
      meta: { title: "个人中心" },
      component: () => import("@/views/personal-center/personal-center.vue")
    },
    {
      path: "change-password",
      title: "修改密码",
      name: "change_password",
      component: () => import("@/views/change-password/change-password.vue")
    },
    {
      path: "category",
      title: "类型列表",
      name: "category",
      component: () => import("@/views/goods/goods-manage/category.vue")
    },
    {
      path: "parameter",
      title: "参数绑定",
      name: "parameter",
      component: () => import("@/views/goods/goods-manage/parameter.vue")
    },
    {
      path: "shop",
      title: "店铺列表",
      name: "shop",
      component: () => import("@/views/seller/shop/shopList.vue")
    },
    {
      path: "bond",
      title: "店铺保证金",
      name: "bond",
      component: () => import("@/views/seller/shop/bond.vue")
    },
    {
      path: "shop-operation",
      title: "店铺操作",
      name: "shop-operation",
      component: () => import("@/views/seller/shop/shopOperation.vue")
    },
    {
      path: "shop-detail",
      title: "店铺详细",
      name: "shop-detail",
      component: () => import("@/views/seller/shop/shopDetail.vue")
    },
    {
      path: "bill-detail",
      title: "结算单详情",
      name: "bill-detail",
      component: () => import("@/views/seller/bill/bill-detail.vue")
    },
    {
      path: "apply-goods",
      title: "商品审核列表",
      name: "apply-goods",
      component: () => import("@/views/goods/goods-info/goodsApply.vue")
    },
    {
      path: "goods",
      title: "管理端商品列表",
      name: "goods",
      component: () => import("@/views/goods/goods-info/goods.vue")
    },
    {
      path: "goods-brand",
      title: "商品品牌",
      name: "goods-brand",
      component: () => import("@/views/goods/goods-manage/brand.vue")
    },
    {
      path: "goods-category",
      title: "商品分类",
      name: "goods-category",
      component: () => import("@/views/goods/goods-manage/category.vue")
    },
    {
      path: "goods-parameter",
      title: "商品参数",
      name: "goods-parameter",
      component: () => import("@/views/goods/goods-manage/parameter.vue")
    },
    {
      path: "goods-spec",
      title: "商品参数",
      name: "goods-spec",
      component: () => import("@/views/goods/goods-manage/spec.vue")
    },
    {
      path: "order-complaint-detail",
      title: "投诉详情",
      name: "order-complaint-detail",
      component: () =>
        import("@/views/order/after-order/orderComplaintDetail.vue")
    },
    {
      path: "order-list",
      title: "订单列表",
      name: "order-list",
      component: () => import("@/views/order/order/orderList.vue")
    },
    {
      path: "order-detail",
      title: "订单详情",
      name: "order-detail",
      component: () => import("@/views/order/order/orderDetail.vue")
    },
    {
      path: "after-order-detail",
      title: "售后单详情",
      name: "after-order-detail",
      component: () =>
        import("@/views/order/after-order/afterSaleOrderDetail.vue")
    },
    {
      path: "member-detail",
      title: "会员详情",
      name: "member-detail",
      component: () => import("@/views/member/list/memberDetail.vue")
    },
    {
      path: "member-grade",
      title: "会员等级",
      name: "member-grade",
      component: () => import("@/views/member/grade/index.vue")
    },
    {
      path: "member-plus",
      title: "PLUS会员",
      name: "member-plus",
      component: () => import("@/views/member/plus/index.vue")
    },
    {
      path: "plus-equity",
      title: "权益设置",
      name: "plus-equity",
      component: () => import("@/views/member/plus/equity.vue")
    },

    {
      path: "goods/goods-info/goodsDetail",
      title: "商品详情",
      name: "goods-detail",
      component: () => import("@/views/goods/goods-info/goodsDetail.vue")
    },
    {
      path: "promotions/add-points-goods",
      title: "添加积分商品",
      name: "add-points-goods",
      component: () =>
        import("@/views/promotions/points-goods/points-goods-add.vue")
    },
    {
      path: "promotions/points-goods-cash",
      title: "积分抵现",
      name: "points-goods-cash",
      component: () =>
        import("@/views/promotions/points-goods/points-goods-cash.vue")
    },
    {
      path: "promotions/edit-points-goods",
      title: "修改积分商品",
      name: "edit-points-goods",
      component: () =>
        import("@/views/promotions/points-goods/points-goods-edit.vue")
    },
    {
      path: "promotions/manager-points-goods-category",
      title: "积分商品分类",
      name: "manager-points-goods-category",
      component: () =>
        import("@/views/promotions/points-goods-category/points-goods-category.vue")
    },
    {
      path: "promotions/replacement",
      title: "加价购",
      name: "replacement",
      component: () => import("@/views/promotions/replacement/replacement.vue")
    },
    {
      path: "promotions/replacement-detail",
      title: "加价购详情",
      name: "replacement-detail",
      component: () => import("@/views/promotions/replacement/replacement-detail.vue")
    },
    {
      path: "promotions/add-kanJia-activity-goods",
      title: "添加砍价活动",
      name: "add-kanJia-activity-goods",
      component: () => import("@/views/promotions/kanjia/kanjia-activity-add-goods.vue")
    },
    {
      path: "promotions/edit-kanJia-activity-goods",
      title: "修改砍价活动",
      name: "edit-kanJia-activity-goods",
      component: () => import("@/views/promotions/kanjia/kanjia-activity-edit-goods.vue")
    },
    {
      path: "promotions/manager-coupon",
      title: "平台优惠券",
      name: "manager-coupon",
      component: () => import("@/views/promotions/coupon/coupon.vue")
    },
    {
      path: "promotions/add-platform-coupon",
      title: "添加平台优惠券",
      name: "add-platform-coupon",
      component: () => import("@/views/promotions/coupon/coupon-publish.vue")
    },
    {
      path: "promotions/edit-platform-coupon",
      title: "编辑平台优惠券",
      name: "edit-platform-coupon",
      component: () => import("@/views/promotions/coupon/coupon-publish.vue")
    },
    {
      path: "promotions/add-coupon-activity",
      title: "添加优惠券活动",
      name: "add-coupon-activity",
      component: () => import("@/views/promotions/coupon-activity/coupon-publish.vue")
    },
    {
      path: "promotions/edit-coupon-activity",
      title: "编辑平台优惠券活动",
      name: "edit-coupon-activity",
      component: () => import("@/views/promotions/coupon-activity/coupon-publish.vue")
    },
    {
      path: "promotions/coupon-activity-info",
      title: "券活动详情",
      name: "coupon-activity-info",
      component: () => import("@/views/promotions/coupon-activity/coupon-info.vue")
    },
    {
      path: "promotions/manager-pintuan",
      title: "平台拼团",
      name: "manager-pintuan",
      component: () => import("@/views/promotions/pintuan/pintuan.vue")
    },
    {
      path: "promotions/pintuan/pintuan-goods",
      title: "拼团商品",
      name: "pintuan-goods",
      component: () => import("@/views/promotions/pintuan/pintuan-goods.vue")
    },
    {
      path: "promotions/full-discount-detail",
      title: "满减满折详情",
      name: "full-discount-detail",
      component: () => import("@/views/promotions/full-discount/full-discount-detail.vue")
    },
    {
      path: "promotions/seckill/manager-seckill-add",
      title: "编辑秒杀活动",
      name: "manager-seckill-add",
      component: () => import("@/views/promotions/seckill/seckill-add.vue")
    },
    {
      path: "promotions/seckill/seckill-goods",
      title: "秒杀商品",
      name: "seckill-goods",
      component: () => import("@/views/promotions/seckill/seckill-goods.vue")
    },
    {
      path: "/floorList/renovation",
      title: "编辑模板",
      name: "renovation",
      component: () => import("@/views/page-decoration/renovation.vue")
    },
    {
      path: "/floorList/main",
      title: "编辑模板",
      name: "main",
      component: () => import("@/views/page-decoration/wap/main.vue")
    },
    {
      path: "add-sms-sign",
      title: "短信签名",
      name: "add-sms-sign",
      component: () => import("@/views/sys/message/smsSign.vue")
    },
    {
      path: "live-detail",
      title: "查看直播",
      name: "live-detail",
      component: () => import("@/views/promotions/live/live-detail.vue")
    },
    {
      path: "person-manage/person-student",
      title: "学生管理",
      name: "person-student",
      component: () => import("@/views/person-manage/person-student/student.vue")
    },
    {
      path: "person-manage/person-teacher",
      title: "教师管理",
      name: "person-teacher",
      component: () => import("@/views/person-manage/person-teacher/teacher.vue")
    },
    {
      path: "person-manage/person-expert",
      title: "专家管理",
      name: "person-expert",
      component: () => import("@/views/person-manage/person-expert/expert.vue")
    },
    {
      path: "person-manage/person-nurse",
      title: "护士管理",
      name: "person-nurse",
      component: () => import("@/views/person-manage/person-nurse/nurse.vue")
    },
    {
      path: "yard-manage/yard",
      title: "场地管理",
      name: "yard",
      component: () => import("@/views/yard-manage/yard/yard.vue")
    },
    {
      path: "yard-manage/yard-form",
      title: "编辑场地",
      name: "yard-form",
      component: () => import("@/views/yard-manage/yard/yardForm.vue")
    },
    {
      path: "consult-manage/examine",
      title: "服务审核",
      name: "examine",
      component: () => import("@/views/consult-manage/consult-examine/examine.vue")
    },
    {
      path: "consult-manage/online",
      title: "在线咨询",
      name: "online",
      component: () => import("@/views/consult-manage/consult-online/online.vue")
    },
    {
      path: "consult-manage/appointment",
      title: "线下预约",
      name: "appointment",
      component: () => import("@/views/consult-manage/consult-appointment/appointment.vue")
    },
    {
      path: "withdrawal-manage/withdrawal",
      title: "提现审核",
      name: "withdrawal",
      component: () => import("@/views/withdrawal-manage/withdrawal/withdrawal.vue")
    },
    {
      path: "base-manage/train-base",
      title: "基地管理",
      name: "train-base",
      component: () => import("@/views/base-manage/base/trainBase.vue")
    },
    {
      path: "base-manage/base-form",
      title: "编辑基地",
      name: "base-form",
      component: () => import("@/views/base-manage/base/baseForm.vue")
    },
    {
      path: "appoint-record/appoint-record",
      title: "预约记录",
      name: "appoint-record",
      component: () => import("@/views/base-manage/appoint-record/appointRecord.vue")
    },
    {
      path: "curriculum-manage/special-column",
      title: "专栏管理",
      name: "special-column",
      component: () => import("@/views/curriculum-manage/curriculum-special/special-column.vue")
    },
    {
      path: "curriculum-manage/approval",
      title: "课题审批",
      name: "approval",
      component: () => import("@/views/curriculum-manage/curriculum-approval/approval.vue")
    },
    {
      path:'curriculum-manage/course-detail',
      title: "课题详情",
      name:'course-detail',
      component: () => import("@/views/curriculum-manage/curriculum-approval/course-detail.vue"),
    },
    {
      path:'curriculum-manage/course-play',
      title: "课题预览",
      name:'course-play',
      component: () => import("@/views/curriculum-manage/curriculum-approval/course-play.vue"),
    },
    {
      path: "news-manage/news-list",
      title: "资讯管理",
      name: "news-list",
      component: () => import("@/views/news-manage/news-info/news-list.vue")
    },
    {
      path: "news-manage/news-form",
      title: "编辑资讯",
      name: "news-form",
      component: () => import("@/views/news-manage/news-info/newsForm.vue")
    },
    {
      path: "news-manage/news-release",
      title: "发布资讯",
      name: "news-release",
      component: () => import("@/views/news-manage/news-info/newsRelease.vue")
    },
    {
      path: "news-manage/news-detail",
      title: "资讯详情",
      name: "news-detail",
      component: () => import("@/views/news-manage/news-info/newsDetail.vue")
    },
    {
      path: "news-manage/news-examine",
      title: "审核资讯",
      name: "news-examine",
      component: () => import("@/views/news-manage/news-info/newsExamine.vue")
    },
    {
      path: "keyword-manage/keyword-list",
      title: "关键字",
      name: "keyword-list",
      component: () => import("@/views/community-manage/keyword-manage/keyword-list.vue")
    },
    {
      path: "subject-manage/subject-list",
      title: "话题管理",
      name: "subject-list",
      component: () => import("@/views/community-manage/subject-manage/subject-list.vue")
    },
    {
      path: "comment-manage/comment-list",
      title: "评论管理",
      name: "comment-list",
      component: () => import("@/views/community-manage/comment-manage/comment-list.vue")
    },
    {
      path: "activity-manage/activity-list",
      title: "活动管理",
      name: "activity-list",
      component: () => import("@/views/community-manage/activity-manage/activity-list.vue")
    },
    {
      path: "activity-manage/activity-form",
      title: "编辑活动",
      name: "activity-form",
      component: () => import("@/views/community-manage/activity-manage/activity-form.vue")
    },
    {
      path: "activity-manage/activity-detail",
      title: "活动详情",
      name: "activity-detail",
      component: () => import("@/views/community-manage/activity-manage/activity-detail.vue")
    },
    {
      path: "field-manage/field-list",
      title: "圈子管理",
      name: "field-list",
      component: () => import("@/views/community-manage/field-manage/field-list.vue")
    },
    {
      path: "field-manage/field-form",
      title: "编辑圈子",
      name: "field-form",
      component: () => import("@/views/community-manage/field-manage/field-form.vue")
    },
    {
      path: "authen-manage/authen-list",
      title: "认证管理",
      name: "authen-list",
      component: () => import("@/views/community-manage/authen-manage/authen-list.vue")
    },
    {
      path: "dynamic-manage/dynamic-list",
      title: "动态管理",
      name: "dynamic-list",
      component: () => import("@/views/community-manage/dynamic-manage/dynamic-list.vue")
    },
    {
      path: "studio-manage/examine-list",
      title: "直播审核",
      name: "examine-list",
      component: () => import("@/views/studio-manage/studio-examine/examine-list.vue")
    },
    {
      path: "studio-manage/studio-list",
      title: "直播管理",
      name: "studio-list",
      component: () => import("@/views/studio-manage/studio-manage/studio-list.vue")
    },
    {
      path: "studio-manage/appeal-list",
      title: "申诉管理",
      name: "appeal-list",
      component: () => import("@/views/studio-manage/studio-appeal/appeal-list.vue")
    },
    {
      path: "partner-manage/pather-banner",
      title: "轮播图",
      name: "pather-banner",
      component: () => import("@/views/partner-manage/partner-banner/pather-banner.vue")
    },
    {
      path: "partner-manage/pather-list",
      title: "合作伙伴",
      name: "pather-list",
      component: () => import("@/views/partner-manage/cooperative-partner/pather-list.vue")
    },
    {
      path: "partner-manage/patherForm",
      title: "编辑合作伙伴",
      name: "pather-form",
      component: () => import("@/views/partner-manage/cooperative-partner/patherForm.vue")
    },
    {
      path: "partner-manage/pather-detail",
      title: "查看合作伙伴",
      name: "pather-detail",
      component: () => import("@/views/partner-manage/cooperative-partner/pather-detail.vue")
    },
    {
      path: "member/comment-manage",
      title: "评论管理",
      name: "comment-manage",
      component: () => import("@/views/member/comment-manage/index.vue")
    },
  ]
};

export const page404 = {
  path: "/*",
  name: "error-404",
  meta: {
    title: "404-页面不存在"
  },
  component: () => import("@/views/error-page/404.vue")
};

export const page403 = {
  path: "/403",
  meta: {
    title: "403-权限不足"
  },
  name: "error-403",
  component: () => import("@/views/error-page/403.vue")
};

export const page500 = {
  path: "/500",
  meta: {
    title: "500-服务端错误"
  },
  name: "error-500",
  component: () => import("@/views/error-page/500.vue")
};

// 所有上面定义的路由都要写在下面的routers里
export const routers = [loginRouter, otherRouter, page500, page403];
